package com.gin.danbooru.api

import com.gin.danbooru.response.detail.PostsDetail
import com.gin.danbooru.response.search.PostsSearchBody
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * @author BX-Gin
 * @from 2024/2/27 10:09
 */
interface PostsApi {
    /**
     * 搜索作品
     */
    @GET("posts")
    fun getSearch(@Query("tags") tags: String, @Query("page") page: Int? = 1): Call<PostsSearchBody>

    /**
     * 查询作品详情
     */
    @GET("posts/{id}")
    fun getDetail(@Path("id") id: Long): Call<PostsDetail>


}